package com.example.my_music_palyer.mapper;

import com.example.my_music_palyer.model.Music;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Mapper
public interface LoveMusicMapper {

    Music findLoveMusicByMusicIdAndUserId(@Param("userId") int userId,@Param("musicId") int musicId);

    int insertLoveMusic(@Param("userId") int userId,@Param("musicId") int musicId);


    List<Music> findLoveMusicByUserId(@Param("userId") int userId);

    List<Music> findLoveMusicBykeyAndUID(@Param("musicName") String musicName,@Param("userId")  int userId);

    int deleteLoveMusic(@Param("userId")int userId,@Param("musicId")int musicId);

    int deleteLoveMusicByMusicId(@Param("musicId")int musicId);
}
